﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace WebPlatform.Models
{
    public class CompanyVM
    {
        /// <summary>
        /// 企业的名称
        /// </summary>
        [Required(AllowEmptyStrings = false, ErrorMessage = "企业名称 必填（100个字符以内）")]
        [StringLength(100, ErrorMessage = "企业名称 不超过100个字符")]
        public string Name { get; set; }


        /// <summary>
        /// 企业的联系电话，手机或固话 
        /// </summary>
        [Required(AllowEmptyStrings = false, ErrorMessage = "联系电话 必填（30个字符以内）")]
        [StringLength(30, ErrorMessage = "联系电话 不超过30个字符")]
        [RegularExpression(@"^([0-9_-]|\s){0,30}$", ErrorMessage = "联系电话 不超过30个字符")]
        public string Phone { get; set; }


        /// <summary>
        /// 企业的传真号码 
        /// </summary>
        public string Fax { get; set; }


        /// <summary>
        /// 企业电子邮件
        /// </summary>
        [Required(AllowEmptyStrings = false, ErrorMessage = "企业邮箱 必填（30个字符以内）")]
        [StringLength(30, ErrorMessage = "企业邮箱 不超过30个字符")]
        [RegularExpression(@"^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$", ErrorMessage = "企业邮箱 不超过30个字符")]
        public string Email { get; set; }


        /// <summary>
        /// 域名的备案号码 
        /// </summary>
        //[Required(AllowEmptyStrings = false, ErrorMessage = "备案号码 必填")]
        //[StringLength(20, ErrorMessage = "备案号码 不超过20个字符")]
        public string PublishNumber { get; set; }


        /// <summary>
        /// 公司的详细地址 
        /// </summary>
        [Required(AllowEmptyStrings = false, ErrorMessage = "企业地址 必填（100个字符以内）")]
        [StringLength(100, ErrorMessage = "企业地址 不超过100个字符")]
        public string Address { get; set; }


        /// <summary>
        /// 公司的介绍
        /// </summary>
        [AllowHtml]
        public string Introduction { get; set; }


        /// <summary>
        /// 公司的文化 
        /// </summary>
        [AllowHtml]
        public string Culture { get; set; }


        /// <summary>
        /// 公司的联系方式 
        /// </summary>
        [AllowHtml]
        public string Contact { get; set; }


        /// <summary>
        /// 联系人
        /// </summary>
        [Required(AllowEmptyStrings = false, ErrorMessage = "联系人 必填（30个字符以内）")]
        [StringLength(30, ErrorMessage = "联系人 不超过30个字符")]
        public string ContactName { get; set; }


        /// <summary>
        /// 企业ID
        /// </summary>
        public int CompanyID { get; set; }


        /// <summary>
        /// 简介
        /// </summary>
        [StringLength(250, ErrorMessage = "简介 不超过250个字符")]
        public string Intro { get; set; }


        /// <summary>
        /// 视频
        /// </summary>
        [AllowHtml]
        [StringLength(250, ErrorMessage = "视频 不超过250个字符")]
        public string MediaUrl { get; set; }
    }
}